package org.fund.common.util;

import java.math.BigDecimal;

/**
 * @Author:
 * @Date: 2022/3/21 15:04
 * @Description:
 */
public class BigDecimalUtils {
    public static final BigDecimal to4Decimal(BigDecimal sourceNum){
        return sourceNum.setScale(4,BigDecimal.ROUND_HALF_UP);
    }

    public static final BigDecimal subtract(String now,String before){
        return new BigDecimal(now).subtract(new BigDecimal(before));
    }

}
